portableSql

DayOfWeek Portable SQL Function

Syntax

DayOfWeek as N (DateTime as D)

DayOfWeek as N (DateTime as T)

Arguments

DateTimeDate Time

A field or value.

Returns

resultNumeric

Returns the day number of the week from a date or datetime value.

Description

Extract the day number of the week from a date or datetime value.

Discussion

The DayOfWeek function extracts the day number of the week from a date or datetime value.

DayOfWeek() function executed on the Northwind Access database
SELECT FIRST 1 CurrentDateTime() AS Now, DayOfWeek(CurrentDateTime()) AS Expr1 FROM Orders
=10/10/2019 12:48:35 00 pm|5